package cn.dt70.dao.aqbProject;

import cn.dt70.pojo.AqbProject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AqbProjectMapper {

    //新增一条项目记录
    Integer saveProBase(AqbProject aqbProject) throws Exception;

    //修改项目
    Integer updateProject(AqbProject aqbProject) throws Exception;

    //查询单条项目
    AqbProject selectOneProject(@Param("proId") Integer proId,
                                @Param("proCode") String proCode
    ) throws Exception;

    AqbProject selectSpecialProject(@Param("proType") Integer proType) throws Exception;

    //查询项目列表
    List<AqbProject> selectAllProjects(@Param("createrId") Integer createrId,
                                       @Param("proType") Integer proType,
                                       @Param("proStatus1") Integer proStatus1,
                                       @Param("proStatus2") Integer proStatus2,
                                       @Param("start") Integer start,
                                       @Param("pageSize") Integer pageSize
    ) throws Exception;

    //查询项目条数
    Integer selectCountOfProject(@Param("createrId") Integer createrId,
                                 @Param("proType") Integer proType,
                                 @Param("proStatus1") Integer proStatus1,
                                 @Param("proStatus2") Integer proStatus2
    ) throws Exception;

    //查询项目列表
    List<AqbProject> selectAllProject(@Param("createrId") Integer createrId,
                                       @Param("proType") Integer proType,
                                       @Param("proStatus1") Integer proStatus1,
                                       @Param("proStatus2") Integer proStatus2,
                                       @Param("userName")String userName,
                                       @Param("start") Integer start,
                                       @Param("pageSize") Integer pageSize
    ) throws Exception;

    //查询项目条数
    Integer selectCountOfProjects(@Param("createrId") Integer createrId,
                                 @Param("proType") Integer proType,
                                 @Param("userName")String userName,
                                 @Param("proStatus1") Integer proStatus1,
                                 @Param("proStatus2") Integer proStatus2
    ) throws Exception;

    //根据项目编号获取详细信息
    AqbProject detailedProInfo(@Param("proCode") String proCode) throws Exception;

    //根据项目编号审核信息
    int proCheck(
            @Param("proStatus") int proStatus,
            @Param("proCode") String proCode
    ) throws Exception;

}
